<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"
     xml:lang="en">
  <head>
    <title>Information Center for ARM</title>
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
    <link type="text/css" rel="stylesheet" media="all" href="file://$TOOLKIT_DIR$/doc/infocenter/style/ewic.css" />
  </head>
  <body>
  <div id="topbanner"></div>
  <div id="titlebanner_small">
    <h2>Information Center for ARM</h2>
  </div>
  <div class="breadcrumb"><a href="$TOOLKIT_DIR$/doc/infocenter/index.ENU.html">Information Center for ARM</a> | EXAMPLES</div>
  <div class="mainblock">
   <h2>Example description</h2>

   <pre>  <!--Insert readme.txt-->
Master

Purpose:
	This example uses I2C as master device to transfer data 
	from/to I2C slave device
	- First, the master transmit to slave a number of data bytes
	- Then, the master receive a number of data bytes from slave.
	- Finally, the master send two bytes to slave, send repeat start
	immediately and receive from slave a number of data byte.
	- Using in polling mode.

Hardware configuration:
	This example is tested on IAR-LPC1768-SK and Keil MCB2300 platform v4.0 with LPC1768
	These jumpers must be configured as following:

	IAR_LPC1768_SK board
		PWR_SEL     - depending of power source
		RST_E       - unfilled
		ISP_E       - unfilled
		
		-SDA -> UXT-6
		-SDL -> UXT-5
		-GND -> UXT-2

	KEIL board
		- VBUS, LED must be closed.
		- All remaining jumpers must be opened.
		
		This example use only one I2C peripheral to test.
		For I2C0:
		- SDA -> P0.27
		- SCL -> P0.28
		For I2C2:
		- SDA -> P0.10
		- SCL -> P0.11

	Common ground must be connected together between two board.
		
		
Running mode:
	This example can run on RAM mode with a debugger or run on FLASH.
	
Note:
  To use with KEIL board use Defined Symbols option to define __KEIL_17xx__
  
-----------------------------------------------------------------------------------
Slave

Purpose:
	This example uses I2C as slave device to transfer data 
	from/to I2C master device
	- First, the master transmit to slave a number of data bytes
	- Then, the master receive a number of data bytes from slave.
	- Finally, the master send two bytes to slave, send repeat start
	immediately and receive from slave a number of data byte.
	- Using in polling mode.

Hardware configuration:
	This example is tested on IAR-LPC1768-SK and Keil MCB2300 platform v4.0 with LPC1768
	These jumpers must be configured as following:

	IAR_LPC1768_SK board
		PWR_SEL     - depending of power source
		RST_E       - unfilled
		ISP_E       - unfilled
		
		-SDA -> UXT-6
		-SDL -> UXT-5
		-GND -> UXT-2

	KEIL board
		- VBUS, LED must be closed.
		- All remaining jumpers must be opened.
		
		This example use only one I2C peripheral to test.
		For I2C0:
		- SDA -> P0.27
		- SCL -> P0.28
		For I2C2:
		- SDA -> P0.10
		- SCL -> P0.11

	Common ground must be connected together between two board.
		
		
Running mode:
	This example can run on RAM mode with a debugger or run on FLASH.
	
Note:
	To use with KEIL board use Defined Symbols option to define __KEIL_17xx__

-----------------------------------------------------------------------------------
Master_Slave_Interrupt

Purpose:
	This example uses two I2C peripheral on the same chip LPC1768, one set as master and
	the other set as slave.
	- First, the master transmit to slave a number of data bytes
	- Then, the master receive a number of data bytes from slave.
	- Finally, the master send two bytes to slave, send repeat start
	immediately and receive from slave a number of data byte.
	- Both of them used in interrupt mode.

Hardware configuration:
	This example tested on Keil MCB2300 platform v4.0 with LPC1768
	These jumpers must be configured as following:
		- VBUS, LED must be closed.
		- All remaining jumpers must be opened.
		
		This example use both two I2C peripheral to test.
		For I2C0:
		- SDA -> P0.27
		- SCL -> P0.28
		For I2C2:
		- SDA -> P0.10
		- SCL -> P0.11
		These pin above must be connect in 'pin-to-pin' style, 
		that means SDA <-> SDA, SCL <-> SCL.
		
		
Running mode:
	This example can run on RAM mode with a debugger or run on FLASH.
	
Note:
	None
  
-----------------------------------------------------------------------------------
pca8581_polling

Purpose:
	An example of I2C using polling mode to test the I2C driver.
	Using EEPROM PCA8581 to transfer a number of data byte.

Hardware configuration:
	This example is tested on IAR-LPC1768-SK and Keil MCB2300 platform v4.0 with LPC1768
	These jumpers must be configured as following:

	IAR_LPC1768_SK board
		PWR_SEL     - depending of power source
		RST_E       - unfilled
		ISP_E       - unfilled
		
		-SDA -> UXT-6
		-SDL -> UXT-5
		-GND -> UXT-2

	KEIL board
		- VBUS, LED must be closed.
		- All remaining jumpers must be opened.
		
		This example use only one I2C peripheral to test.
		For I2C0:
		- SDA -> P0.27
		- SCL -> P0.28
		For I2C2:
		- SDA -> P0.10
		- SCL -> P0.11
		
	For the EEPROM PCA8581:
	Pin A0, A1 and A2 must be connected to ground. Slave address is 0xA0 (8-bit format)
		
Running mode:
	This example can run on RAM mode with a debugger or run on FLASH.
	
Note:
	To use with KEIL board use Defined Symbols option to define __KEIL_17xx__

-----------------------------------------------------------------------------------
sc16is750_int

Purpose:
	An example of I2C using interrupt mode to test the I2C driver.
	Using I2C at mode I2C master/8bit on LPC1766 to communicate with
	SC16IS750/760 Demo Board

Hardware configuration:
	This example is tested on IAR-LPC1768-SK and Keil MCB2300 platform v4.0 with LPC1768
	These jumpers must be configured as following:

	IAR_LPC1768_SK board
		PWR_SEL     - depending of power source
		RST_E       - unfilled
		ISP_E       - unfilled
		
		-SDA -> UXT-6
		-SDL -> UXT-5
		-GND -> UXT-2
	KEIL board
		- VBUS, LED must be closed.
		- All remaining jumpers must be opened.
		
		This example use only one I2C peripheral to test.
		For I2C0:
		- SDA -> P0.27
		- SCL -> P0.28
		For I2C2:
		- SDA -> P0.10
		- SCL -> P0.11

	Common ground must be connected together between two board.
		
Running mode:
	This example can run on RAM mode with a debugger or run on FLASH.
	
Note:
	To use with KEIL board use Defined Symbols option to define __KEIL_17xx__
  
-----------------------------------------------------------------------------------
sc16is750_polling

Purpose:
	An example of I2C using polling mode to test the I2C driver.
	Using I2C at mode I2C master/8bit on LPC1768 to communicate with
	SC16IS750/760 Demo Board.
	UART0 - 115200bps - 8 data bit - No parity - 1 stop bit - No flow control.

Hardware configuration:
	This example is tested on IAR-LPC1768-SK and Keil MCB2300 platform v4.0 with LPC1768
	These jumpers must be configured as following:

	IAR_LPC1768_SK board
		PWR_SEL     - depending of power source
		RST_E       - unfilled
		ISP_E       - unfilled
		
		-SDA -> UXT-6
		-SDL -> UXT-5
		-GND -> UXT-2

	KEIL board
		- VBUS, LED must be closed.
		- All remaining jumpers must be opened.
		
		This example use only one I2C peripheral to test.
		For I2C0:
		- SDA -> P0.27
		- SCL -> P0.28
		For I2C2:
		- SDA -> P0.10
		- SCL -> P0.11

	Common ground must be connected together between two board.
		
Running mode:
	This example can run on RAM mode with a debugger or run on FLASH.
	
Note:
	To use with KEIL board use Defined Symbols option to define __KEIL_17xx__
  </pre>

  </div>
  </body>
</html>

